var cc__decorate = __decorate;
Object.defineProperty(exports, "__esModule", {
  value: true
});
var $2pvzChannel = require("pvzChannel");
var $2SceneStage = require("SceneStage");
var cc__decorator = cc._decorator;
var ccp_ccclass = cc__decorator.ccclass;
var ccp_property = cc__decorator.property;
var def_NoSunUI = /* */function (_cc$Component53) {
  babel_inherits(r, _cc$Component53);
  var _super57 = babel_createSuper(r);
  function r() {
    var _this122;
    babel_classCallCheck(this, r);
    _this122 = _super57.apply(this, arguments);
    _this122.bt1 = null;
    _this122.close = null;
    _this122.video = null;
    return _this122;
  }
  babel_createClass(r, [{
    key: "onLoad",
    value: function onLoad() {
      var _this123 = this;
      this.bt1.on(cc.Node.EventType.TOUCH_END, function () {
        $2SceneStage.default.instance.onClickAddGold();
      }, this);
      this.close.on(cc.Node.EventType.TOUCH_END, function () {
        _this123.hide();
      }, this);
    }
  }, {
    key: "show",
    value: function show(e) {
      this.node.parent = e;
      $2SceneStage.default.instance.pause();
      if ($2pvzChannel.pvzChannel.instance().channel.indexOf("wx") >= 0) {
        $2pvzChannel.pvzChannel.instance().showBanner();
        $2pvzChannel.pvzChannel.instance().closeNative("nativeIcon");
        $2pvzChannel.pvzChannel.instance().getCtrl("p4") && (this.video.active = false);
      }
    }
  }, {
    key: "hide",
    value: function hide() {
      this.node.destroy();
      $2SceneStage.default.instance.resume();
    }
  }]);
  return r;
}(cc.Component);
cc__decorate([ccp_property(cc.Node)], def_NoSunUI.prototype, "bt1", undefined);
cc__decorate([ccp_property(cc.Node)], def_NoSunUI.prototype, "close", undefined);
cc__decorate([ccp_property(cc.Node)], def_NoSunUI.prototype, "video", undefined);
def_NoSunUI = cc__decorate([ccp_ccclass], def_NoSunUI);
exports.default = def_NoSunUI;